package com.common.UITags;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;
/**
 * 换行
 * @author zhanglong
 *
 */
public class NextLineTag extends TagSupport{
	private static final long serialVersionUID = 1L;

	@Override
	public int doStartTag() throws JspException {
		try{
			JspWriter out = pageContext.getOut();
			StringBuffer sBF = new StringBuffer();
			sBF.setLength(0);
			sBF.append("</tr><tr>");
			out.print(sBF.toString());
		}catch (IOException e) {
			throw new JspException("标签往前台写数据时异常");
		}catch(Exception e){
			throw new JspException("其他异常");
		}
		return SKIP_BODY;
	}

	@Override
	public int doEndTag() throws JspException {
		return EVAL_PAGE;
	}
	
}
